package com.jprocms.module.cms.controller.admin.content.vo;

import com.jpro.framework.common.pojo.PageParam;
import com.jprocms.module.cms.enums.EnumContentStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.time.OffsetDateTime;

@Schema(description = "内容上下篇 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@NoArgsConstructor
public class ContentSideReqVO extends PageParam {

    @Schema(description = "内容id")
    private Long id;

    @Schema(description = "父栏目ID")
    private Long channelId;

    @Schema(description = "内容状态")
    private Integer status = EnumContentStatus.PUBLISHED.getStatus();

    @Schema(description = "发布时间查询结束时间")
    private OffsetDateTime releaseTime;

    @Schema(description = "置顶级别")
    private Integer topLevel;

    /**
     * 是否下一篇
     */
    @Schema(description = "是否下一篇")
    private Boolean next = true;

    @Schema(description = "站点ID")
    private Long siteId;

    public ContentSideReqVO(Long id, Long channelId, Long siteId, OffsetDateTime releaseTime, Integer topLevel) {
        this.id = id;
        this.channelId = channelId;
        this.siteId = siteId;
        this.releaseTime = releaseTime;
        this.topLevel = topLevel;
    }

    public ContentSideReqVO(Long id, Long channelId, OffsetDateTime releaseTime, Integer topLevel, Boolean next) {
        this.id = id;
        this.channelId = channelId;
        this.releaseTime = releaseTime;
        this.topLevel = topLevel;
        this.next = next;
    }
}
